$(function(){
	//登录按钮点击事件
	$("#submit").click(function(){
		//序列化表单，得到一个数组
		var formArr = $("#form").serializeArray();
		//定义一个data变量
		var data = {"usersName":formArr[0].value,"usersPassword":formArr[1].value,"usersType":3}
		//定义一个URL变量
		var url = "../../user/isLogin.action";
		$.ajax({
			url:url,
			data:data,
			success:function(msg){
				if(msg.state == "1"){
					location.href = "index.html";
				}else{
					$("#info").text(msg.msg+"用户名或密码有错误!");
				}
			}
		});
	});
})